<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>饼状图Chart</title>
<link rel="stylesheet" type="text/css" href="<%=basePath %>admin/test/bingtu/codebase/GooPieChart.css"/>
<script  type="text/javascript" src="<%=basePath %>admin/test/bingtu/codebase/jquery-1.3.2.min.js"></script>
<!--[if IE]><script  type="text/javascript" src="codebase/excanvas.compiled.js"></script><![endif]-->
<script  type="text/javascript" src="<%=basePath %>admin/test/bingtu/codebase/GooFunc.js"></script>
<script  type="text/javascript" src="<%=basePath %>admin/test/bingtu/codebase/GooPieChart.js"></script>
<script>
var canvas,canvas2;
var property={
	con_width:600,
	con_height:400,
	canvas_width:320,
	canvas_height:320,
	canvas_top:40,
	canvas_left:80,
	core_x:160,
	core_y:160,
	radius:150,
	defaultColor:"#cccccc"  //默认的颜色,如果dataKind中没有，则直接该默认颜色
}

 </script>
 <script>


$(document).ready(function(){
	canvas=$.createGooPieChart($("#mycanvas"),property);
	canvas.setTitle("全省医院各科室预约情况分析统计图","次数");
	//canvas.loadPieData(data,"num","总销量: &d 份");//固定的数据
	//从后台获取数据
	$.ajax({
				   type: 'post',
				   url: "<%=basePath%>getDatayuyueAction",
				   success: function(data)
				   {
				  
				     var json=new Array();
				     json=data.split("\t");
				     var datakind=eval("("+json[1]+")");
				    
				     var piedate=eval("("+json[0]+")");
				    
	                 canvas.setDataKind(datakind);
				     canvas.loadPieData(piedate,"num","当期预约总次数: &d 次");//从后台获取的数据
				   }
			});
			});
			
</script>
</head>
<body>
<div id="mycanvas"></div>
<input type="button" onclick="javascript:history.back()" value="返回" id="a" name="a"/>

</body>
</html>
